< previous page page_528 next page >

Page 528
When you're optimizing the application code, you can use several techniques to increase performance. Some techniques will help make your application faster, whereas others will help make it smaller. One problem that you face when tuning your application is that the changes you make to the code may not always benefit you in the long run. Changes made to the application to improve its performance can cause the code to become more difficult to maintain or change in the future. Sometimes a change can actually decrease an application's performance.
What you have to do is weigh and decide what the final performance of the application will be against the changes you make to affect it. Today's lesson focuses the different tips and techniques that you can use to enhance the performance of an application.
Creating the Right Impression..
You know how first impressions are important. If your application takes a long time to load, it can annoy users and appear as though it's not working correctly. The larger and more complex the first form in the application is, the slower it will load. Any custom controls in the form also must be loaded at startup. And if the first form calls procedures in other modules, these modules must be loaded at startup time as well.
As you can see, performance can very quickly become a domino effect. Adding all this up causes the application to slow down. You can resolve the perceived problem by changing how the application is started. Rather than have the application's main form be the first one displayed, use a splash screen instead (see Figure 19.1).
12181-0528a.gif
Figure 19.1.
Present users with a splash screen to enhance
startup performance.
This splash screen should have the minimum amount of processing code in it. While the screen is displayed, the main form is loaded. Finally, when the main form is ready to

 
< previous page page_528 next page >

If you like this book, buy it!